<template>
  <Card title="报警次数">
    <PieVue ref="pieChart"> </PieVue>
  </Card>
</template>

<script>
import { defineComponent } from "vue";

import Card from "./Card.vue";
import RectNum from "./RectNum.vue";
import RoundProgress from "./RoundProgress.vue";
import PieVue from "../echarts/pie.vue";
import { dangerBj } from "@/api/threeD";
export default defineComponent({
  name: "AlarmNum",
  components: {
    Card,
    RectNum,
    RoundProgress,
    PieVue,
  },
  props: {
    marginBottom: {
      type: Number,
      default: Number,
    },
    marginTop: {
      type: Number,
      default: Number,
    },
  },
  data() {
    return {
      total: 0,
      pieData: [],
    };
  },
  methods: {
    setData(data) {
      this.pieData = data.byLevel;
    },
  },
  mounted() {
    dangerBj().then((res) => {
      console.log(res);
    });
    // this.$refs.RoundProgress.render(0);
  },
});
</script>

<style lang="scss" scoped>
.alarm-num {
  display: flex;
  align-items: center;

  .left {
    width: 50%;
  }

  .right {
    width: 50%;
  }
}

.chart {
  height: 200px;
}
</style>
